﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UrScriptProgram
{
    public class GoUp
    {
        public static String GetScript()
        {
            String program = "";
            program += "def goup():\n";
            program += "  global firstPoint=[-3.1415926535897932,-1.5707963267948966,-1.5707963267948966,-1.5707963267948966,1.5707963267948966,-3.1415926535897932]\n";
            //program += "  movej(firstPoint, a=0.3962634015954636, v=0.0471975511965976)\n";
            //1，获取当前笛卡尔坐标至变量pos   pos= get_actual_tcp_pose()
            program += "global tcp= get_actual_tcp_pose()\n";
            //program += "global jpos= get_actual_joint_positions()\n";
            //program += "global jpos= get_forward_kin(jpos,tcp)\n";
            //2，将变量pos的z值+20mm  pos[2]=pso[2]+20
            program += "tcp[2]=tcp[2]+0.3\n";
            //3，调用move指令移动机械臂 movej(pos, a=0.3962634015954636, v=1.0471975511965976)
            program += "movej(tcp, a=1.3962634015954636, v=1.0471975511965976)\n";
            program += "end\n";

            return program;
        }

        //public static String GetScript()
        //{

        //}
    }
}
